package com.mvp.mvpdemo.base

import androidx.lifecycle.LifecycleObserver


/**
 * author    : mahongyin
 * e-mail    : mhy.work@foxmail.com
 * date      : 2020-10-23 14:40
 * introduce : 全部Presenter都要继承实现此接口的BasePresenter
 */
interface IPresenter<V : IBaseView> : LifecycleObserver {
    /**
     * 绑定view
     * @param view V
     */
    fun attachView(view: V)

    /**
     * view
     * @return V?
     */
    fun getView(): V?

    /**
     * 解绑view
     */
    fun detachView()


    fun showLoading()
    fun hideLoading()
}